package it.application.smoc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import android.content.Context;

public class Utilities {
	public static String leggiDaFileAssets(Context x, String file) {
		InputStream input;
		BufferedReader reader;
		String str, data = "";
		try {
			input = x.getAssets().open(file);
			reader = new BufferedReader (new InputStreamReader(input, "UTF-8"));
			while ((str = reader.readLine()) != null) {
				data += str;
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return data;
	}
}
